<script>
    const age = 12;
    const name = "lucy";

    const p1 = { name: name, age: age }
    console.log(p1)


    //ES6
    const p2 = { name, age }
    p2.name = "tom"
    console.log(p2)
</script>